package au.com.iglootech.silmbox_sm;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import au.com.iglootech.silmbox_sm.enities.User;
import au.com.iglootech.silmbox_sm.service.UserService;

import com.vaadin.ui.Label;
import com.vaadin.ui.Window;
@Configurable(preConstruction = true)
@Component
@Scope("session")
public class SilmboxMainWindow extends Window {
	@Autowired
	private UserService userService;
	
	public SilmboxMainWindow(String title)
	{
		super(title);
		Label label = new Label("Hello Vaadin user");
		addComponent(label);
		userService.createUser(new User());
	}
}
